/**
 * 
 * @author  phoenics@126.com
 * @version v.0.1
 * @date  2018年6月24日 上午12:37:03 
 * 
 */
package phoenics.upservice;



import org.dozer.spring.DozerBeanMapperFactoryBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.Resource;

/**
 *
 */
@Configuration
public class DozerConfig {
	private static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DozerConfig.class);
	@Bean
	public DozerBeanMapperFactoryBean dozerBeanMapperFactoryBean(
			@Value("classpath*:dozerMapping/*mappings.xml") Resource[] resources) throws Exception {
		final DozerBeanMapperFactoryBean dozerBeanMapperFactoryBean = new DozerBeanMapperFactoryBean();
		dozerBeanMapperFactoryBean.setMappingFiles(resources);
		return dozerBeanMapperFactoryBean;
	}
}
